package org.lex.depends.core.classloader;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;

public final class ProxyClassLoader extends ClassLoader {
	private final ClassLoader proxy;

	public ProxyClassLoader(ClassLoader proxy) {
		this.proxy = proxy;
	}

	public void clearAssertionStatus() {
		proxy.clearAssertionStatus();
	}

	public boolean equals(Object obj) {
		return proxy.equals(obj);
	}

	public URL getResource(String name) {
		return proxy.getResource(name);
	}

	public InputStream getResourceAsStream(String name) {
		return proxy.getResourceAsStream(name);
	}

	public Enumeration<URL> getResources(String name) throws IOException {
		return proxy.getResources(name);
	}

	public int hashCode() {
		return proxy.hashCode();
	}

	public Class<?> loadClass(String name) throws ClassNotFoundException {
		return proxy.loadClass(name);
	}

	public void setClassAssertionStatus(String className, boolean enabled) {
		proxy.setClassAssertionStatus(className, enabled);
	}

	public void setDefaultAssertionStatus(boolean enabled) {
		proxy.setDefaultAssertionStatus(enabled);
	}

	public void setPackageAssertionStatus(String packageName, boolean enabled) {
		proxy.setPackageAssertionStatus(packageName, enabled);
	}

	public String toString() {
		return proxy.toString();
	}
}
